﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Site1.Master" AutoEventWireup="true" CodeBehind="Index.aspx.cs" Inherits="BoxScore.equipo.Index" %>
<%@ Register src="../compartidas/_publicidadDisponible.ascx" tagname="_publicidadDisponible" tagprefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="lateral1" runat="server">
    

    <uc1:_publicidadDisponible ID="_publicidadDisponible2" runat="server"  />
    

</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="lateral2" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="lateral3" runat="server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="contenido" runat="server">

<h2 class="title">Equipos</h2>
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
        AutoGenerateColumns="False" DataSourceID="ObjectDataSource1">
        <Columns>
            <asp:TemplateField ShowHeader="False" SortExpression="logo">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("logo") %>'></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Image ID="Image1" runat="server" AlternateText="Logo del Equipo" Width="100px" 
                        ImageUrl='<%# "~/Equipo/images/" + Eval("logo", "{0}") %>' />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Nombre">
                <ItemTemplate>
                    <asp:HyperLink ID="HyperLink1" runat="server" 
                        NavigateUrl='<%# "~/Equipo/Detalles.aspx?equipo=" + Eval("id", "{0}") %>' Text='<%# Eval("name", "{0}") %>'></asp:HyperLink>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Liga / Torneo">
                <ItemTemplate>
                    <asp:HiddenField ID="HiddenField1" runat="server" 
                        Value='<%# Eval("id", "{0}") %>' />
                        
                    <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" ShowHeader="false" 
                        DataSourceID="ObjectDataSource2" GridLines="None">
                        <Columns>
                            <asp:TemplateField HeaderText="name" ShowHeader="False" SortExpression="name">
                                <EditItemTemplate>
                                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("name") %>'></asp:TextBox>
                                </EditItemTemplate>
                                <ItemTemplate>
                                    <asp:HyperLink ID="HyperLink2" runat="server" 
                                        NavigateUrl='<%# "~/Torneo/Detalles.aspx?torneo=" +Eval("id", "{0}") %>' 
                                        Text='<%# Eval("name", "{0}") %>'></asp:HyperLink>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                    <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" 
                        SelectMethod="getTournamentsByTeam" TypeName="BoxScore.Model.BoxScoreBD">
                        <SelectParameters>
                            <asp:ControlParameter ControlID="HiddenField1" Name="idTeam" 
                                PropertyName="Value" Type="Int32" />
                        </SelectParameters>
                    </asp:ObjectDataSource>
                        
                        
                        
                        
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>


    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
        SelectMethod="getEquipos" TypeName="BoxScore.Model.BoxScoreBD">
    </asp:ObjectDataSource>


</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="resultados" runat="server">
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="proximos" runat="server">
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="publicidadAjena" runat="server">
</asp:Content>
<asp:Content ID="Content9" ContentPlaceHolderID="publicidad" runat="server">
</asp:Content>
